<template>
<!-- 导航头部 共用 -->
  <div class="header" >
    <div class="div1">
      <img src="https://img.axureshop.com/0f/8b/81/0f8b816f57904445a872785742132259/images/%E9%A6%96%E9%A1%B5_3/u3573.png" >
      <div class="div2">
      <p>李思思<button @click="exit()">退出登录</button></p>
      <p>员工ID:111111 <span class="el-icon-caret-bottom"></span></p> 
      </div>
    
    </div>
    <div class="nav">
        <router-link to="/shouye">首页</router-link>
        <router-link to="/diancan">点餐</router-link>
        <router-link to="/zhuowei">桌位</router-link>
        <router-link to="/dingdan">订单</router-link>
        <router-link to="/baobiao">报表</router-link>
    </div>
    
  </div>
</template>

<script>
import {exitdenglu} from"@/apis/yanwengang/yanwengang.js"
export default {
  data() {
    return {
    
    };
  },
  methods: {
   exit(){
    exitdenglu().then((ok)=>{
      console.log(ok);
      this.$router.replace("/denglu")
    })
   }
  },
};
</script>

<style scoped>
*{
  padding: 0;
  margin: 0;
}
.header{
  width: 100%;
  height: auto;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  margin: 0px auto;
  display: flex;
  font-size: 18px;
  
}
img{
  width: 100px;
  height: 100px;
}
.div1{
  display: flex;
  align-items: center;
}
.div1 button{
  width: 60px;
  height: 20px;
  border: 1px solid #ccc;
  background-color: #fff;
  margin-top: 2px;
  margin-left: 40px;
  font-size: 14px;
}
.div2{
  margin-left: 20px;
  font-size: 20px;
}
.nav{
    width: 500px;
    display: flex;
    justify-content: space-around;
    margin-left: 50px;

}
.nav>a{
    width: 60px;
    height: 100px;
    text-align: center;
    line-height: 100px;
    text-decoration: none;
    color: #000;
    font-size: 20px;
}
</style>